<?php
namespace App\Http\Controllers\Member;

use App\Models\CompanyTags;
use App\Models\CompanyInbox;
/**
 *
 * @author Joker
 *        
 */
class DeliveryController extends MemberController
{
    
    public function __construct() {
        parent::__construct();
        $this->salary = array(0=>'2k以下',1=>'2k~5k',2=>'5k~10k',3=>'10k~15k',4=>'15k~25k',5=>'25k~50k',6=>'50k以上',100=>'不限');
    }
    
    public function index()
    {
        $delivery = CompanyInbox::with('userBelongs')->with('company')->with('jobs')->where('user_id','=',$this->uid)->get();
        foreach ($delivery as &$company)
        {
            $company->comtags = CompanyTags::with('tags')->where('company_id',$company->company->id)->skip(0)->take(2)->get();
        }
        return view('member.delivery.delivery')->with('delivery',$delivery)->with('salary',$this->salary);
    }
    
}